<extend name="Public:common"/>
<block name="css">
    <style>
        th{text-align:center;}
        .required{color:#FF9966}
        .table thead>tr>th, .table tbody>tr>th, .table tfoot>tr>th, .table thead>tr>td, .table tbody>tr>td, .table tfoot>tr>td{padding:10px;}
        .one,.three{width:10%;}
        .two,.four{width:40%;text-align: left;}
        .detail>tbody>tr>td:nth-child(2){text-align: left;}
        .detail>tbody>tr>td:nth-child(4){text-align: left;}
        .imgSize img{max-width: 100%;overflow: hidden;}
        .type-item {
            background: #ccc;
            width: 100px;
            text-align: center;
            padding: 5px 0;
        }
    </style>
</block>
<block name="content">
    <div class="page-header"><h1><i class="fa fa-home"></i> 首页>产品管理>线路管理>线路审核</h1></div>
    <div class="tab-content">
        <div class="container-fluid">
            <h3>线路基本信息</h3>
            <table class="table table-striped table-bordered table-hover table-condensed text-center detail">
                <tbody>
                <tr>
                    <td class="one"><span class="required">*</span><b>线路名称:</b> </td><td class="two"> {$info.line_name}</td>
                    <td class="three"><span class="required">*</span><b>预计收客人数:</b></td><td class="four"> {$info.guests_num}人 </td>
                </tr>
                <tr>
                    <td><span class="required">*</span><b>线路编号:</b></td><td> {$info.line_sn}</td>
                    <td><span class="required">*</span><b>出团日期:</b></td><td>
                    <if condition="$info['is_everyday'] eq 1">
                        {$info['start_time']|date="Y-m-d",###}至{$info['end_time']|date="Y-m-d",###} 天天出团
                        <else/>
                        {$info.forum_time}
                    </if>
                </td>
                </tr>
                <tr>
                    <td><span class="required">*</span><b>团号:</b></td><td> {$info.group_num}</td>
                    <td><span class="required">*</span><b>截止收团:</b></td><td> 出团{$info.till_day}天前收团</td>
                </tr>
                <tr>
                    <td><span class="required">*</span><b>行程天数:</b></td><td> {$info.travel_days}天</td>
                    <td><span class="required">*</span><b>预订时间:</b></td><td> 出团{$info.book_day}天前开始预订</td>
                </tr>
                <tr>
                    <td><span class="required">*</span><b>出发城市:</b></td><td> {$info.areaName}</td>
                    <td><span class="required">*</span><b>目的地城市:</b></td><td>{$info.destinationCity}</td>
                </tr>
                <tr>
                    <td><span class="required">*</span><b>线路主题:</b></td><td>{$info.theme_name} </td>
                    <td><span class="required">*</span><b>签证信息:</b></td><td> {$info.visa}</td>
                </tr>


                <tr>
                    <td><span class="required">*</span><b>补房差:</b></td><td> {$info.add_room_price|default=0}元/人</td>
                    <td></td>
                </tr>

                <tr>
                    <td><span class="required">*</span><b>优惠设置:</b></td><td>
                    <if condition="$info['discounts_condition']&&$info['discounts']">
                        满{$info.discounts_condition}人 优惠{$info.discounts}
                    </if>
                    <td></td><td></td>
                    </td>
                </tr>

                <tr>
                    <td><span class="required">*</span><b>可选服务:</b></td>
                    <td colspan="3">
                        <label class="type-item ">可酒店升级列表</label>
                        <table class="table table-striped table-bordered table-hover table-condensed text-center">
                            <tbody>
                            <tr>
                                <th>供应商</th>
                                <th>币种</th>
                                <th>名称</th>
                                <th>星级</th>
                                <th>数量</th>
                                <th>成人成本价</th>
                                <th>儿童成本价</th>
                                <th>统一升级费用</th>
                            </tr>

                            <volist name="info.upgradeHotel" id="vo">
                                <tr>
                                    <td>{$vo.supplier_name}</td>
                                    <td>{$vo.money_type}</td>
                                    <td>{$vo.room_name}</td>
                                    <td>{$vo.star_level}</td>
                                    <td>{$vo.room_count}</td>
                                    <td>{$vo.adult_actual_cost}</td>
                                    <td>{$vo.child_actual_cost}</td>
                                    <td>{$vo.to_operator_price}</td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>

                        <label class="type-item ">可选保险</label>
                        <table class="table table-striped table-bordered table-hover table-condensed text-center">
                            <tbody>
                            <tr>
                                <th>供应商</th>
                                <th>币种</th>
                                <th>名称</th>
                                <th>成人成本价</th>
                                <th>儿童成本价</th>
                                <th>给运营商成人价</th>
                                <th>给运营商儿童价</th>
                            </tr>
                            <volist name="info.checkedInsure" id="vo">
                                <tr>
                                    <td>{$vo.supplier_name}</td>
                                    <td>{$vo.money_type}</td>
                                    <td>{$vo.insure_name}</td>
                                    <td>{$vo.adult_actual_cost}</td>
                                    <td>{$vo.child_actual_cost}</td>
                                    <td>{$vo.now_adult_price}</td>
                                    <td>{$vo.now_child_price}</td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>
                        <label class="type-item ">可选坐席</label>
                        <table class="table table-striped table-bordered table-hover table-condensed text-center">
                            <tbody>
                            <tr>
                                <th>坐席</th>
                                <th>币种</th>
                                <th>出发|回来</th>
                                <th>数量</th>
                                <th>成人成本价</th>
                                <th>儿童成本价</th>
                                <th>给运营商成人价</th>
                                <th>给运营商儿童价</th>
                            </tr>
                            <volist name="info.upgradeTrafficList" id="vo">
                                <tr>
                                    <td>{$vo.seat_name}</td>
                                    <td>{$vo.origin_money_type}</td>
                                    <td>
                                        <switch name="vo.type">
                                            <case value="1">出发</case>
                                            <case value="2">返回</case>
                                        </switch>
                                    </td>
                                    <td>{$vo.seat_num}</td>
                                    <td>{$vo.origin_adult_price}</td>
                                    <td>{$vo.origin_child_price}</td>
                                    <td>{$vo.now_adult_price}</td>
                                    <td>{$vo.now_child_price}</td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>

                    </td>
                </tr>

                <tr>
                    <td><span class="required">*</span><b>已包含基础服务:</b></td>
                    <td colspan="3">
                        <label class="type-item ">交通方式(去):</label>
                        <table class="table table-striped table-bordered table-hover table-condensed text-center">
                            <tbody>
                            <tr>
                                <th>供应商</th>
                                <th>线路名称</th>
                                <th>币种</th>
                                <th>交通方式</th>
                                <th>座位</th>
                                <th>数量</th>
                                <th>成人价</th>
                                <th>儿童价</th>
                            </tr>
                            <tr>
                                <td>{$info.goTraffic.supplier_name}</td>
                                <td>{$info.goTraffic.routes_name}</td>
                                <td>{$info.goTraffic.money_type}</td>
                                <td>{$info.goTraffic.traffic_name}</td>
                                <td>{$info.goTraffic.seat_name}</td>
                                <td>{$info.goTraffic.seat_num}</td>
                                <td>{$info.goTraffic.adult_actual_cost}</td>
                                <td>{$info.goTraffic.child_actual_cost}</td>
                            </tr>
                            </tbody>
                        </table>

                        <label class="type-item ">交通方式(回):</label>
                        <table class="table table-striped table-bordered table-hover table-condensed text-center">
                            <tbody>
                            <tr>
                                <th>供应商</th>
                                <th>线路名称</th>
                                <th>币种</th>
                                <th>交通方式</th>
                                <th>座位</th>
                                <th>数量</th>
                                <th>成人成本价</th>
                                <th>儿童成本价</th>
                            </tr>
                            <tr>
                                <td>{$info.backTraffic.supplier_name}</td>
                                <td>{$info.backTraffic.routes_name}</td>
                                <td>{$info.backTraffic.money_type}</td>
                                <td>{$info.backTraffic.traffic_name}</td>
                                <td>{$info.backTraffic.seat_name}</td>
                                <td>{$info.backTraffic.seat_num}</td>
                                <td>{$info.backTraffic.adult_actual_cost}</td>
                                <td>{$info.backTraffic.child_actual_cost}</td>
                            </tr>
                            </tbody>
                        </table>
                        <label class="type-item ">打包酒店列表</label>
                        <label class="label label-primary" for="">打包给运营商的价格: <b>{$info.hotel_price}</b></label>
                        <table class="table table-striped table-bordered table-hover table-condensed text-center">
                            <tbody>
                            <tr>
                                <th>供应商</th>
                                <th>币种</th>
                                <th>名称</th>
                                <th>等级</th>
                                <th>数量</th>
                                <th>成人成本价</th>
                                <th>儿童成本价</th>
                            </tr>
                            <volist name="info.checkedHotel" id="vo">
                                <tr>
                                    <td>{$vo.supplier_name}</td>
                                    <td>{$vo.money_type}</td>
                                    <td>{$vo.room_name}</td>
                                    <td>{$vo.star_level}</td>
                                    <td>{$vo.room_count}</td>
                                    <td>{$vo.adult_actual_cost}</td>
                                    <td>{$vo.child_actual_cost}</td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>

                        <label class="type-item ">包含景区列表</label>
                        <table class="table table-striped table-bordered table-hover table-condensed text-center">
                            <tbody>
                            <tr>
                                <th>供应商</th>
                                <th>币种</th>
                                <th>名称</th>
                                <th>级别</th>
                                <th>成人成本价</th>
                                <th>儿童成本价</th>
                            </tr>
                            <volist name="info.checkedScenic" id="vo">
                                <tr>
                                    <td>{$vo.supplier_name}</td>
                                    <td>{$vo.money_type}</td>
                                    <td>{$vo.scenic_name}</td>
                                    <td>{$vo.scenic_level}A</td>
                                    <td>{$vo.adult_actual_cost}</td>
                                    <td>{$vo.child_actual_cost}</td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>

                    </td>
                </tr>


                </tbody>
            </table>


            <!--给运营商价格信息-->
            <h3><span class="required">*</span>给运营商价格信息({$supplierInfo.currency})</h3>
            <table class="table table-striped table-bordered table-hover table-condensed text-center detail">
                <tbody>
                <tr>
                    <th>成人价</th>
                    <th>儿童价</th>
                    <!--<th>老人价</th>-->
                </tr>
                <tr>
                    <td>{$info.adult_money}/大人 </td>
                    <td>{$info.child_money}/儿童 </td>
                   <!-- <td>{$info.oldman_money}/老人 </td>-->
                </tr>
                </tbody>
            </table>
            <h3><span class="required">*</span>给运营商的特殊日期价格({$supplierInfo.currency})</h3>
            <table class="table table-striped table-bordered table-hover table-condensed text-center detail">
                <tbody>
                <tr>
                    <th>日期</th>
                    <th>成人价</th>
                    <th>儿童价</th>
                    <!--<th>老人价</th>-->
                </tr>
                <volist name="info.specialPrice" id="vo">
                    <tr>
                        <td><span class="required"></span><b>{:date('Y-m-d',strtotime($vo['day']))}</b> </td>
                        <td>{$vo.adult_price}/大人 </td>
                        <td>{$vo.child_price}/儿童 </td>
                        <!--<td>{$vo.oldman_price}/老人 </td>-->
                    </tr>
                </volist>

                </tbody>
            </table>


            <h3><span class="required">*</span>行程安排</h3>
            <table class="table table-striped table-bordered table-hover table-condensed text-center">
                <tbody>
                <volist name="info['trip']" id="vo">
                    <tr>
                        <td style="width:10%; vertical-align: middle;" ><b>第{$vo.current_day}天</b></td>
                        <td style="width:90%">
                            <h5 class="text-left">
                                <div for="" class="label label-info">行程信息:</div>
                            </h5>
                            <table class="table table-striped table-bordered table-hover table-condensed text-left ">
                                <tbody>
                                <tr>
                                    <th>行程标题</th>
                                    <th>线路特色</th>
                                    <th>用餐</th>
                                    <th>游玩景区</th>
                                    <th>酒店列表</th>
                                    <th>可升级酒店</th>
                                </tr>
                                <tr>
                                    <td class="col-md-2 col-xs-2">{$vo.trip_title}</td>
                                    <td class="col-md-2 col-xs-2">{$vo.features}</td>
                                    <td class="col-md-2 col-xs-2">{$vo.dining}</td>
                                    <td class="col-md-2 col-xs-2">{$vo.scenic_name}</td>
                                    <td class="col-md-2 col-xs-2">{$vo.hotel_name}</td>
                                    <td class="col-md-2 col-xs-2">{$vo.up_hotel_name}</td>
                                </tr>
                                <tr>
                                    <td colspan="6">
                                        <label for="" class="label label-info">描述:</label>
                                        {:html_entity_decode($vo['trip_details'])}
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            <!--游玩项目-->
                            <if condition="$vo['play']">
                                <h5 class="text-left">
                                    <div for="" class="label label-info">游玩项目:</div>
                                </h5>
                                <table class="table table-striped table-bordered table-hover table-condensed " id="addPlayTr_1" data-currday="1">
                                    <tbody><tr>
                                        <th>名称</th>
                                        <th>参考价值</th>
                                        <th>详情备注</th>
                                    </tr>
                                    <volist name="vo.play" id="pv">
                                        <tr>
                                            <td>{$pv.name}</td>
                                            <td>{$pv.price}</td>
                                            <td>{$pv.note}</td>
                                        </tr>
                                    </volist>
                                    </tbody>
                                </table>
                            </if>
                            <!--购物项目-->
                            <if condition="$vo['shopping']">
                                <h5 class="text-left">
                                    <div for="" class="label label-info">购物项目:</div>
                                </h5>
                                <table class="table table-striped table-bordered table-hover table-condensed " id="addPlayTr_1" data-currday="1">
                                    <tbody><tr>
                                        <th>名称</th>
                                        <th>营业产品</th>
                                        <th>停留时间</th>
                                        <th>说明</th>
                                    </tr>
                                    <volist name="vo.shopping" id="sv">
                                        <tr>
                                            <td>{$sv.shopping_name}</td>
                                            <td>{$sv.product}</td>
                                            <td>{$sv.stay_time}</td>
                                            <td>{$sv.instructions}</td>
                                        </tr>
                                    </volist>
                                    </tbody>
                                </table>
                            </if>

                        </td>
                    </tr>


                </volist>
                <!-- <tr>
                     <td><b>备注</b></td>
                     <td class="imgList text-left" >
                         <textarea class="form-control" name="" id="" cols="30" rows="10"></textarea>
                     </td>
                 </tr>-->

                <tr>
                    <td><b>上架状态</b></td>
                    <td  colspan="2"  class=" text-left" >
                        <switch name="info.line_status">
                            <case value="1">已上架</case>
                            <case value="0">待审核</case>
                            <case value="-1">已下架</case>
                            <case value="-2">已拒绝</case>
                        </switch>
                    </td>
                </tr>
                </tbody>
            </table>

            <!--成本价格信息--->
            <h3><span class="required">*</span>附加产品({$supplierInfo.currency})</h3>
            <table class="table table-striped table-bordered table-hover table-condensed text-center detail">
                <tbody>
                <tr>
                    <th>名称</th>
                    <th>价格</th>
                    <!--<th>是否显示</th>-->
                </tr>
                <volist name="info.addition" id="vo">
                    <tr>
                        <td class="col-md-4 col-xs-4">{$vo.product_name}</td>
                        <td class="col-md-4 col-xs-4">{$vo.product_price}</td>
                        <!--<td class="col-md-4 col-xs-4">
                            <if condition="$vo['is_show'] eq 1">
                                显示
                                <else/>
                                隐藏
                            </if>
                        </td>-->
                    </tr>
                </volist>

                </tbody>
            </table>

            <form action="" method="post">
                <input type="hidden" name="id" value="{:I('id')}" >
                <input type="hidden" name="status" value="0" >
                <div class="row text-center">
                    <a class="btn btn-info" href="javascript:history.go(-1)">返 回</a>

                    <if condition="$info['line_status'] eq 0 || $info['line_status'] eq -1 ">
                        <a class="btn btn-warning" href="javascript:auditLine(-2)">拒绝</a>
                        <a class="btn btn-warning" href="javascript:auditLine(1)">通过</a>
                    </if>
                </div>
            </form>

        </div>
    </div>
</block>
<block name="js">
    <script>
        $(function () {
            $('.text-center').find('img').css('width','auto');
            $('.text-center').find('img').css('height','auto');
            $('.text-center').find('img').css('width','200px');
        })
        function auditLine(status) {
            $("input[name='status']").val(status);
            $('form')[0].submit();
        }
    </script>
</block>